package com.anyou.mall.goo.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.goo.mapper.JfDrawRecordMapper;
import com.anyou.mall.goo.domain.JfDrawRecord;
import com.anyou.mall.goo.service.IJfDrawRecordService;

/**
 * 积分抽奖中奖记录Service业务层处理
 * 
 * @author clx
 * @date 2023-10-24
 */
@Service
public class JfDrawRecordServiceImpl implements IJfDrawRecordService 
{
    @Autowired
    private JfDrawRecordMapper jfDrawRecordMapper;

    /**
     * 查询积分抽奖中奖记录
     * 
     * @param drawRecordId 积分抽奖中奖记录主键
     * @return 积分抽奖中奖记录
     */
    @Override
    public JfDrawRecord selectJfDrawRecordByDrawRecordId(Long drawRecordId)
    {
        return jfDrawRecordMapper.selectJfDrawRecordByDrawRecordId(drawRecordId);
    }

    /**
     * 查询积分抽奖中奖记录列表
     * 
     * @param jfDrawRecord 积分抽奖中奖记录
     * @return 积分抽奖中奖记录
     */
    @Override
    public List<JfDrawRecord> selectJfDrawRecordList(JfDrawRecord jfDrawRecord)
    {
        return jfDrawRecordMapper.selectJfDrawRecordList(jfDrawRecord);
    }

    /**
     * 新增积分抽奖中奖记录
     * 
     * @param jfDrawRecord 积分抽奖中奖记录
     * @return 结果
     */
    @Override
    public int insertJfDrawRecord(JfDrawRecord jfDrawRecord)
    {
        jfDrawRecord.setCreateTime(DateUtils.getNowDate());
        return jfDrawRecordMapper.insertJfDrawRecord(jfDrawRecord);
    }

    /**
     * 修改积分抽奖中奖记录
     * 
     * @param jfDrawRecord 积分抽奖中奖记录
     * @return 结果
     */
    @Override
    public int updateJfDrawRecord(JfDrawRecord jfDrawRecord)
    {
        jfDrawRecord.setUpdateTime(DateUtils.getNowDate());
        return jfDrawRecordMapper.updateJfDrawRecord(jfDrawRecord);
    }

    /**
     * 批量删除积分抽奖中奖记录
     * 
     * @param drawRecordIds 需要删除的积分抽奖中奖记录主键
     * @return 结果
     */
    @Override
    public int deleteJfDrawRecordByDrawRecordIds(Long[] drawRecordIds)
    {
        return jfDrawRecordMapper.deleteJfDrawRecordByDrawRecordIds(drawRecordIds);
    }

    /**
     * 删除积分抽奖中奖记录信息
     * 
     * @param drawRecordId 积分抽奖中奖记录主键
     * @return 结果
     */
    @Override
    public int deleteJfDrawRecordByDrawRecordId(Long drawRecordId)
    {
        return jfDrawRecordMapper.deleteJfDrawRecordByDrawRecordId(drawRecordId);
    }
}
